1. Field of the Invention
The present invention relates to external storage devices. Specifically, the present invention relates to a system for managing power in an external storage device, such as an optical disk drive.
2. Description of the Related Art
In a computer system, a host computer commonly sends read and/or write commands to an external storage device, which is commonly attached to the host computer system by a cable. One type of external storage device is an optical disk drive. An optical disk drive may derive its operating power (receive current) from an attached battery, or from the host computer via a universal serial bus (USB) which transfers data between the disk drive and the host computer. Optical disk drives typically require a relatively large surge of power to perform particular commands, such as seek, read, spin up or spin down. In some optical disk drive systems, the power from a particular power source may be insufficient at times for the optical disk drive to execute these commands. This may cause undesirable effects on system performance.
The present invention relates to a system for managing power in an external storage device, such as an optical disk drive. Optical disk drives typically require a relatively large surge of power to perform particular operations, such as seek, read, spin up or spin down. For example, the optical disk drive may require relatively large surges of power to control the movement of a spindle associated with an optical disk within the disk drive.
One aspect of the invention relates to an external storage device in communication with a host computer and a power source. The power source provides power to a motor driver within the external storage device. The external storage device comprises a microcontroller and an energy storage circuit, which is coupled to a line between the power source and the motor driver. The energy storage circuit stores energy from the power source and provides supplemental power to the motor driver. The microcontroller determines whether the power source and the energy storage circuit can provide sufficient power for the external storage device to properly execute a particular command received by the external storage device from the host computer. The microcontroller performs an operation according to a reduced power execution mode if the current from the power source and the energy storage circuit is insufficient for the external storage device to properly execute a particular command received from the host computer. In one embodiment, the microcontroller suspends the command until the energy storage circuit has stored sufficient energy for the external storage device to execute the command. In another embodiment, the microcontroller executes the command at a rate slower than a normal rate when there is sufficient power from the power source and the energy storage circuit. In yet another embodiment, the microcontroller can selectively performs one of the two operations, i.e., either suspending the command until the energy storage circuit has stored sufficient energy or executing the command at a rate slower than a normal rate.
Another aspect of the present invention relates to a method of managing power in an external storage device. The method comprises storing energy from a power source in an energy storage circuit within the external storage device. The method further comprises monitoring the amount of energy in the energy storage circuit when the external storage device receives a command from a host computer. Based on the act of monitoring, the method further comprises selectively performing an operation according to a reduced power execution mode when a combined current from the power source and the energy storage circuit is insufficient for the external storage device to properly execute a particular command from the host computer. In one embodiment, the microcontroller suspends the command until the energy storage circuit has stored sufficient energy for the external storage device to execute the command. In another embodiment, the microcontroller executes the command at a rate slower than a normal rate when there is sufficient power from the power source and the energy storage circuit. In yet another embodiment, the microcontroller can selectively performs one of the two operations, i.e., either suspending the command until the energy storage circuit has stored sufficient energy or executing the command at a rate slower than a normal rate.
Another aspect of the invention relates to an external storage drive for use with a computer. The external storage device comprises at least one motor which receives power from a primary power source over a power supply line, an energy storage circuit which receives energy from the primary power source and stores the energy to provide supplemental power to the at least one motor, and a microcontroller which monitors a quantity of energy stored by the energy storage circuit. The microcontroller is programmed to delay or slow down an operation of at least one predetermined type of command when a level of energy stored by the energy storage circuit is insufficient to immediately perform the operation at a regular rate.